package org.tlipoca.smcomment.service;

import com.baomidou.mybatisplus.extension.service.IService;
import org.genntii.smcommon.result.PageResult;
import org.genntii.smdomain.dto.CommentDTO;
import org.genntii.smdomain.entity.Comment;
import org.genntii.smdomain.vo.CommentClientVO;
import org.genntii.smdomain.vo.CommentDetailVO;
import org.genntii.smdomain.vo.CommentReplyVO;
import org.genntii.smdomain.vo.CommentVO;
import org.springframework.web.multipart.MultipartFile;

import java.util.ArrayList;
import java.util.Map;

public interface CommentService extends IService<Comment> {
    Long getCommentTotalByUserId(Long userId);

    Boolean getCommentExistsService(Long commentId);

    PageResult<CommentDetailVO> getCommentListByArticleIdService(Long articleId, Integer pageNum, Integer pageSize,Long userId);

    ArrayList<CommentVO> getCommentTreeService(Long articleId, Long userId);

    void addCommentService(CommentDTO commentDTO,Long userId,Long replyCommentId);

    void deleteComment(Long commentId);

    Map<Integer, String> picBatchUpload(MultipartFile[] files);

    String picUpload(MultipartFile file);

    ArrayList<CommentReplyVO> getAllReply(Long commentId, Long userId);

    Integer getCommentCount(Long articleId);

    ArrayList<CommentClientVO> getArticleByUserId(Long userId);

    ArrayList<CommentClientVO> getCommentLimit(Long userId, Integer pageNum, Integer pageSize);

    CommentDetailVO getCommentDetail(Long commentId, Long userId);

    CommentReplyVO getCommentReply(Long commentId, Long userId);
}
